//
//  UIView+Animation.h
//  ZhaoCaiMao
//
//  Created by xieyingze on 2017/3/13.
//  Copyright © 2017年 谢英泽. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <POP.h>
#import "AppHeader.h"

typedef NS_ENUM(NSInteger, kRotateType) {
    
    kRotateTypeX = 0,
    kRotateTypeY,
    kRotateTypeZ,
};

typedef void(^kAnimationComplete)(id obj, BOOL finish);

@interface UIView (Animation)

#pragma mark - 跳动效果(固定频率)

- (void)setAnimationWithActive;

#pragma mark - 心跳效果

- (void)setAnimationWithHeartBeat:(id)repeatTimes;

- (void)stopHeartBeat;

#pragma mark - 翻转效果

- (void)setAnimationWithOverTurnIn:(UIView *)superView from:(UIView *)firstView to:(UIView *)secondView;

#pragma mark - 摇摆效果

- (void)setAnimationWithRock:(id)repeatTimes;

#pragma mark - 旋转

- (void)setAnimationWithRotationView:(kRotateType)rotateType isRepeatTime:(id)repeatTime;

- (void)setAnimationWithRotationView:(kRotateType)rotateType isRepeatTime:(id)repeatTime duration:(CGFloat)duration;

#pragma mark - 震动效果

- (void)setAnimationWithShake;

#pragma mark - 数字转动
/**
 整数数字转动动画
 */
- (void)setAnimationWithJumpIntNuberFormNumber:(NSInteger)fromNumber toNumber:(NSInteger)toNumber;
/**
 浮点数转动动画
 */
- (void)setAnimationWithJumpNuberFormNumber:(CGFloat)fromNumber toNumber:(CGFloat)toNumber;

- (void)setAnimationWithJumpNuberFormNumber:(CGFloat)fromNumber toNumber:(CGFloat)toNumber complete:(kAnimationComplete)complete;

- (void)setAnimationWithJumpNuberFormNumber:(CGFloat)fromNumber toNumber:(CGFloat)toNumber duration:(CGFloat)duration complete:(kAnimationComplete)complete;

@end
